#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main()
{
    char a[200];
    while(gets(a))
    {

    int i=0,j=0;
    while(isalpha(a[i])==0)
    {
        i++;
    }
    j=i;
    while(a[j]!='\0')
    {
        while(a[j+1]>='a'&&a[j+1]<='z'||a[j+1]>='A'&&a[j+1]<='Z')
        {
            j++;
        }
        for(int k=i;k<=j;k++)
        {
            printf("%c",a[k]);
        }
        printf("\n");
        j++;
        while(isalpha(a[j])==0&&a[j]!='\0')
        {
            j++;
        }
        i=j;
    }
    }
    return 0;
}
